﻿@model TestOnlineProject.Models.Entities.Section
@using TestOnlineProject.Models.Entities
@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script type="text/javascript">
</script>
<div class="site_map">
    @Html.ActionLink("Home", "Index", "Home") / @Html.ActionLink("Subjects", "Index", "Subject", new { id = (ViewBag.Subject as Subject).SubjectId }, null)
    / @Html.ActionLink((ViewBag.Subject as Subject).Code, "Details", "Subject", new { id = (ViewBag.Subject as Subject).SubjectId }, null)
    / @Html.ActionLink("Sections", "Index", "Section", new { subjectId = (@ViewBag.Subject as Subject).SubjectId }, null)
    / Create Section</div>
    <br/>
<div class="main_nav">
    <span><a href="@Url.Content("~/Section/Index")?subjectId=@Model.SubjectId">
        <img src="@Url.Content("~/Images/back button.png")" style="height:30px"/></a>
    </span>
</div>
<br />
<span class="require_info">(*) is required.</span>
@using (Html.BeginForm())
{
    <span class="errorMsg">@Html.ValidationSummary(true)</span>
    <table class="table table-bordered">
        <tr>
            <td style="width: 150px; text-align: right">
                <span>Name</span><span>&nbsp;(*)</span>
            </td>
            <td>
                <span class="errorMsg">@Html.ValidationMessageFor(model => model.Name)</span>
                @Html.HiddenFor(model => model.SubjectId)
                @Html.HiddenFor(model => model.UserId)
                @Html.TextBoxFor(model => model.Name)
            </td>
        </tr>
        <tr>
            <td style="text-align: right">
            </td>
            <td>
                <button class="btn" type="submit" style="width: 80px">
                    Create</button>
                @Html.ActionLink("Reset", "Create", new { subjectId = @ViewBag.Subject.SubjectId }, new { @class = "btn", style = "width:54px" })
                @Html.ActionLink("Cancel", "Index", new { subjectId = @ViewBag.Subject.SubjectId }, new { @class = "btn", style = "width:54px" })
            </td>
        </tr>
    </table>                        
}
